Repository navigation
Fixes #35879: Preserve remaining search fields and refresh move and label copies - #36256
mohityadav766 wants to merge 3 commits into
Conversation
…search - Moving a container or a knowledge page rewrote, by a bare text prefix, the FQN of every document whose FQN started with the old one: a sibling such as "rawdata" when "raw" moved, and documents of other types that happened to start the same way. The rewrite now matches the moved entity and what is under it, and replaces only the leading FQN segments. - Changing a team's users through a team PATCH did not re-index those users, so their teams went stale in search. - A user's display-name change now also reaches query users, knowledge page editors and file lastModifiedBy.
…-reading entities A full reindex, the retry-queue replay, reindexEntities and the live updateEntity(ref) path load each entity with its index's required field list. Fields its repository only loads on request were missing from the list, so the search document lost them: - usageSummary for pipelines, dashboards, ML models and schemas. Usage reports re-index through updateEntity(ref), so live usage never reached search for these types. - users on queries, which the Table > Queries panel reads from search. - lastLoginTime and lastActivityTime on users, which the Online Users search filters on. - folder on context files, which the Context Center Documents page filters on. - primaryEntity, relatedEntities, sourceEntity and sourceFile on context memories, which the asset memories listing filters on. Reporting usage for an ML model also failed with "Entity not found: chart": mlModelEntityUsage re-read the model as a chart.
…ts and object labels
Code Review ✅ Approved🟡 Medium risk · Updating search reindexing, rename cascades, and membership propagation could leave entity relationships, labels, or usage data stale across indexed documents. Preserves search document fields across PUT, PATCH, reindex, and rename/move paths so partial entity writes no longer overwrite complete search documents or leave copied labels stale. No open issues found in this review; the PR is still a draft pending full MySQL/Elasticsearch and PostgreSQL/OpenSearch integration runs. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| t.field(prefixFieldCondition) | ||
| .value(FieldValue.of(oldParentFQN)))) | ||
| .should( | ||
| s -> | ||
| s.prefix( | ||
| p -> | ||
| p.field(prefixFieldCondition) | ||
| .value(oldParentFQN + Entity.SEPARATOR))) |
There was a problem hiding this comment.
Container moves rename unrelated files
The boundary check still leaves the intended index restriction incomplete. ContainerRepository.updateAssetIndexes passes GLOBAL_SEARCH_ALIAS, and both Elasticsearch and OpenSearch filter only by fullyQualifiedName. Service names can repeat across service types, so a container and a file can both have svc.raw as their FQN. Moving that container also rewrites the file's search document, although its saved path never changed.
Target the container's write index and add a regression test with matching FQNs across entity types.
mohityadav766
left a comment
There was a problem hiding this comment.
Reviewed the latest head against current main, #35879 and merged #35888. Although #35879 is closed, this follow-up still contains absent fixes: PUT followers/votes and inheritance, reindex field hydration, membership refreshes and copied labels. It is not superseded by the earlier tag-preservation fix. The existing P1 about container moves targeting the global search alias remains applicable; I am not duplicating it inline. No additional substantiated finding from this static pass. The latest service-unit workflow failed, broad integration lanes were skipped, and the PR remains draft pending integration validation. Please resolve the existing index-scoping finding and validate the search/cascade cases on both engines before treating this as ready. No tests run locally.
Reviewed head: ab5f5f0dd223f4fbfb464e7d78d4075a480e6f81.
Fixes #35879
Follow-up to merged #35888. Additional paths still overwrite complete search documents with partial entities or leave copied fields stale.
Changes:
Regression coverage:
Validation on ab5f5f0:
Still outside this PR:
Restrict container move writes to the container index before merging.
Findings
Summary
Preserves fields during entity updates and reindexing, refreshes team membership and copied labels, and includes deleted descendants in rename refreshes.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Container moves] --> B[Update matching FQN through all] B --> C[Container documents renamed] B --> D[File with matching FQN also renamed] D --> E[Search path differs from saved file]Reviews (1) · Last reviewed commit: "fix(search): preserve PUT relationships ..." · Reviewed by Greptile